package com.gsi.webstore.platform.storefront.internal.order;

import java.util.Collection;

import com.gsi.webstore.platform.storefront.capi.order.GSIGiftMessageLineItemBO;
import com.gsi.webstore.platform.storefront.capi.order.GSILineItemCtnrBO;
import com.gsi.webstore.platform.storefront.capi.order.GSILineItemCtnrCalculationResultView;
import com.gsi.webstore.platform.storefront.capi.order.GSITaxInformationBO;
import com.intershop.beehive.foundation.quantity.Money;
import com.intershop.sellside.appbase.b2c.capi.calculation.LineItemCtnrCalculationResultView;
import com.intershop.sellside.appbase.b2c.capi.order.GiftMessageLineItemBO;
import com.intershop.sellside.appbase.b2c.capi.order.GiftMessageLineItemBOProxy;

public class GSIGiftMessageLineItemBOImpl extends GiftMessageLineItemBOProxy implements GSIGiftMessageLineItemBO
{

    private GiftMessageLineItemBO _delegate;
    private GSILineItemCtnrBO _order;
    private LineItemCtnrCalculationResultView _calculationResultView;
    
    public GSIGiftMessageLineItemBOImpl(GiftMessageLineItemBO delegate, GSILineItemCtnrBO order, LineItemCtnrCalculationResultView resultView)
    {
        super(delegate);
        _delegate = delegate;
        _order = order;
        _calculationResultView = resultView;
    }

    public Collection<? extends GSITaxInformationBO> getSalesTaxes()
    {
        return ((GSILineItemCtnrCalculationResultView)_calculationResultView).getItemPriceBasedTaxes(_delegate.getId());
    }

    @Override
    public Money getNetBasePrice()
    {
        return ((GSILineItemCtnrCalculationResultView)_calculationResultView).getGiftOptionNetPrice(_delegate.getId());
    }
}
